package com.iocup.keybastion.authentication.userdetails.password;


/**
 * 密码校验器 from spring security
 * @author xyjxust
 * @create 2020/6/30 11:15
 **/
public class DefaultPasswordVerifiers implements PasswordVerifiers {

    private PasswordEncoder passwordEncoder;

    public DefaultPasswordVerifiers(PasswordEncoder passwordEncoder) {
        this.passwordEncoder = passwordEncoder;
    }

    @Override
    public boolean verifiers(String resource, String target) {
        return passwordEncoder.matches(target, resource);
    }
}
